package com.chenc.javathreads.controlleraop.controller;

import com.chenc.javathreads.controlleraop.aspect.ControllerLog;
import com.chenc.javathreads.controlleraop.dto.OperateApiLogDto;
import com.chenc.javathreads.controlleraop.service.IOperateApiLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @ClassName
 * @Describtion:
 * @Author:Chenc
 * @Date:2023/12/30 21:23
 * @Version 1.0
 */
@Slf4j
@RestController
@RequestMapping("/log")
public class LogController {

    @Autowired
    IOperateApiLogService operateApiLogService;
    @GetMapping("/query")
    public List<OperateApiLogDto> logQuery(@RequestParam("times") String times){
        return operateApiLogService.getlastTimes(times);
    }
}
